Skip to content

chore: more specific problem scale - #2549

Draft
Christopher-Chianelli wants to merge 2 commits into
TimefoldAI:mainfrom
Christopher-Chianelli:chore/more-specific-problem-scale
Draft

chore: more specific problem scale#2549
Christopher-Chianelli wants to merge 2 commits into
TimefoldAI:mainfrom
Christopher-Chianelli:chore/more-specific-problem-scale

Conversation

@Christopher-Chianelli

Copy link
Copy Markdown
Contributor

No description provided.

@triceo triceo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments.

@@ -17,8 +18,10 @@
*/
@NullMarked
public record ProblemSizeStatistics(long entityCount,

@triceo triceo Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing as this is a public API, we should add a backwards-compatible constructor, and deprecate it.
Maybe even a migration script, this one will be easy.

Comment on lines +117 to +118
// Should we include immovable entities for the count?
// Problem scale ignores them.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good question.
IMO we should include them in entity count, but they cannot affect the problem scale, so they don't.

Maybe we log that the entity count includes immovable as well? Not sure. We should definitely log not just "entity count" but "genuine entity count".

var genuineEntityClassCountEntries = problemSizeStatistics.genuineEntityClassToEntityCount().entrySet();
for (var genuineEntityCountEntry : genuineEntityClassCountEntries) {
var geninueEntityClass = genuineEntityCountEntry.getKey();
logger.debug(" Entity ({}) count: {}",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOGGER

.genuineEntityClassToVariableToValueCount()
.get(geninueEntityClass).entrySet()) {
var genuineVariable = geninueVariableEntry.getKey();
logger.debug(" Variable ({}) estimated value count: {}",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we also want to show the variable's value type? Not sure.
I would certainly mention if basic/list.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants